''' 多表单切换???'''
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://www.126.com')

# driver.switch_to.frame('x-URS-iframe')

# 先通过xpth定位到iframe
xf = driver.find_element_by_xpath('//*[@id="x-URS-iframe"]')
driver.switch_to.frame(xf)
driver.switch_to.parent_frame()

driver.find_element_by_name('email').clear()
driver.find_element_by_name('email').send_keys('email')

driver.find_element_by_name('password').clear()
driver.find_element_by_name('password').send_keys('password')

driver.find_element_by_id('dologin').click()
driver.switch_to.default_content()
driver.quit()